import Vue from 'vue'
import App from './App'
import tools from './common/js/tools.js'
import Ajax from './common/js/ajax.js'
import * as filters from './common/js/filters.js'
import md5 from './common/js/md5.js'
import uView from '@/uni_modules/uview-ui'
import MyMixin from './mixins/index.js'
import pagehead from '@/components/page_head.vue'
Object.keys(filters).forEach(key => {
	Vue.filter(key, filters[key]) //插入过滤器名和对应方法
})

// import initTabbar from "components/init-tabbar.vue"
// 图片加载慢组件
import initImage from '@/components/init-image.vue';
Vue.use(uView)
Vue.mixin(MyMixin)

// 注册全局组件
// Vue.component('init-tabbar', initTabbar)
Vue.component('pagehead', pagehead)
Vue.component('init-image', initImage)

import $url from '@/common/js/url.js'
Vue.prototype.$url = $url; 
// 引入全局存储
import store from '@/store';

Vue.config.productionTip = false
Vue.prototype.$tools = tools
Vue.prototype.$Ajax = Ajax;
Vue.prototype.$md5=md5
App.mpType = 'app'

const app = new Vue({
	store,
	...App
})
app.$mount()
